export function download (pdf_name,url) :any{
    return new Promise((resolve, reject) => {
        const filename = pdf_name.replace(/\.pdf/g, '').replace(/\//, '') + '.pdf'
        uni.downloadFile({
          url: url,
          filePath: `${uni.env.USER_DATA_PATH}/${filename}`,
          success: (res) => {
            const filePath = res.filePath

            
           
            resolve(filePath)
          },
          fail: (err) => {
            console.error('下载文档失败', err)
            reject(err)
          }
        })
      })
}